# -*- coding: utf-8 -*-
"""
作者: 肖麒
联系方式：QQ：1505448035
时间: 2025/4/24 15:34
文件作用：
"""
import requests


class SearchApi:
    def __init__(self):
        pass

    def get_search(self):
        headers = {
            "Referer": "https://cn.xgcartoon.com/",
            "Upgrade-Insecure-Requests": "1",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
            "sec-ch-ua": "\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"",
            "sec-ch-ua-mobile": "?0",
            "sec-ch-ua-platform": "\"Windows\""
        }
        url = "https://cn.xgcartoon.com/search"
        params = {
            "q": "凡人修仙传",
        }
        response = requests.get(url, headers=headers, params=params)
        return response.text


if __name__ == '__main__':
    search_api = SearchApi()
    data = search_api.get_search()
    print(data)
